Source File
errors.go
Belonging Package
github.com/Nerzal/gocloak/v13
package gocloakimport ()// HTTPErrorResponse is a model of an error responsetype HTTPErrorResponse struct {Error string `json:"error,omitempty"`Message string `json:"errorMessage,omitempty"`Description string `json:"error_description,omitempty"`}// String returns a string representation of an errorfunc ( HTTPErrorResponse) () string {var strings.Builderif len(.Error) > 0 {.WriteString(.Error)}if len(.Message) > 0 {if .Len() > 0 {.WriteString(": ")}.WriteString(.Message)}if len(.Description) > 0 {if .Len() > 0 {.WriteString(": ")}.WriteString(.Description)}return .String()}// NotEmpty validates that error is not emptypfunc ( HTTPErrorResponse) () bool {return len(.Error) > 0 || len(.Message) > 0 || len(.Description) > 0}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |